package com.neusoft.bigdata.hbase.model;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 统计数据模型
 * 
 * @author lihzh
 * @date 2012-11-21 下午4:35:35
 */
public class StatisticData implements Serializable {

	private static final long serialVersionUID = -7667273068193364269L;

	/**
	 * 年,月，日，时
	 * 
	 * @author lihzh
	 * @date 2012-11-21 下午4:49:36
	 */
	public static enum PeriodType {
		Y, M, D, H
	}

	/**
	 * 统计类型标识(平均，最大，最小值)
	 * 
	 * @author lihzh
	 * @date 2012-11-21 下午4:49:16
	 */
	public static enum StatisticType {
		AVG, MAX, MIN
	}

	private String resourceId;
	private PeriodType periodType;
	private StatisticType statisticType;
	private long startTime;
	private Map<String, Double> metricValueMap = new HashMap<String, Double>();
	
	
	public Map<String, Double> getMetricValueMap() {
		return metricValueMap;
	}

	public void addValue(String metricName, Double value) {
		metricValueMap.put(metricName, value);
	}

	public String getResourceId() {
		return resourceId;
	}

	public void setResourceId(String resourceId) {
		this.resourceId = resourceId;
	}

	public PeriodType getPeriodType() {
		return periodType;
	}

	public void setPeriodType(PeriodType periodType) {
		this.periodType = periodType;
	}

	public StatisticType getStatisticType() {
		return statisticType;
	}

	public void setStatisticType(StatisticType statisticType) {
		this.statisticType = statisticType;
	}

	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

}
